// 库存管理接口
import request from "@/common/request.js";
const api = {
  purchase_in: "/purchase_in/",
  purchase_order: "/purchase_order/",
};

export function get_purchase_in(params) {
  return request({
    url: api.purchase_in,
    method: "get",
    params,
  });
}

export function purchase_in_detail(id) {
  return request({
    url: api.purchase_in + id,
    method: "get",
  });
}

export function get_purchase_order(params) {
  return request({
    url: api.purchase_order,
    method: "get",
    params,
  });
}

export function get_purchase_order_detial(id) {
  return request({
    url: api.purchase_order + id,
    method: "get",
  });
}

export function post_purchase_in(data) {
  return request({
    url: api.purchase_in,
    method: "post",
    data,
  });
}

export function patch_purchase_in(data, id) {
  return request({
    url: api.purchase_in + id + "/",
    method: "patch",
    data,
  });
}

export function delete_purchase_in( id) {
  return request({
    url: api.purchase_in + id + "/",
    method: "delete",
  });
}
